﻿using System;

namespace ISRinterface {
	/// <summary>
	/// Interface IApplication
	/// </summary>
	public interface IApplication {
		/// <summary>
		/// Gets the user config value.
		/// </summary>
		/// <typeparam name="T">Type of the user config value.</typeparam>
		/// <param name="name">The name of the user config value.</param>
		/// <returns>User config value of type T.</returns>
		/// <exception cref="UnknownConfigOption">Thrown if the config value hasn't been found.</exception>
		T getConfigValue<T>(string name);

		/// <summary>
		/// Manages the application life cycle.
		/// </summary>
		/// <param name="args">Command line arguments.</param>
		void run(string[] args);

		/// <summary>
		/// Sets the user config value.
		/// </summary>
		/// <typeparam name="T">Type of the user config value.</typeparam>
		/// <param name="name">The name of the user config value.</param>
		/// <param name="value">The value of the user config value.</param>
		void setConfigValue<T>(string name, T value);
	}
}